<?php

class Application_Model_Blog extends Application_Model_Object
{
    protected $_blogid;
    protected $_username;
    protected $_password;
    protected $_baseurl;
    protected $_xmlrpcsuffix;

    public function setOptions(array $options)
    {
        if (isset($options['blogid'])) {
            $this->setBlogid($options['blogid']);
            unset($options['blogid']);
        }

        if (isset($options['username'])) {
            $this->setUsername($options['username']);
            unset($options['username']);
        }

        if (isset($options['password'])) {
            $this->setPassword($options['password']);
            unset($options['password']);
        }

        if (isset($options['baseurl'])) {
            $this->setBaseurl($options['baseurl']);
            unset($options['baseurl']);
        }

        if (isset($options['xmlrpcsuffix'])) {
            $this->setXmlrpcsuffix($options['xmlrpcsuffix']);
            unset($options['xmlrpcsuffix']);
        }

    }

    public function setBlogid($blogid)
    {
        $this->_blogid = $blogid;
    }
    public function getBlogid()
    {
        return $this->_blogid;
    }

    public function setUsername($username)
    {
        $this->_username = $username;
    }
    public function getUsername()
    {
        return $this->_username;
    }

    public function setPassword($password)
    {
        $this->_password = $password;
    }
    public function getPassword()
    {
        return $this->_password;
    }

    public function setBaseurl($baseurl)
    {
        $this->_baseurl = $baseurl;
    }
    public function getBaseurl()
    {
        return $this->_baseurl;
    }

    public function setXmlrpcsuffix($xmlrpcsuffix)
    {
        $this->_xmlrpcsuffix = $xmlrpcsuffix;
    }
    public function getXmlrpcsuffix()
    {
        return $this->_xmlrpcsuffix;
    }

    public function getXmlrpcUrl()
    {
        return $this->_baseurl . $this->_xmlrpcsuffix;
    }


}

